<!---
*******************************************************************************
Copyright (C) 2006 Ryan Hickman (rhickman@gmail.com)
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
     http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*******************************************************************************

Description:
This is a test page for calling the number2text ColdFusion custom tag. In this
example you can see several uses for the tag.
		
*******************************************************************************
--->
<cfparam name="URL.NumberString" default="123.45">
<!--- Get only the decimal value of the number for this example --->
<cfset Variables.Cents = Right(DecimalFormat(URL.NumberString), 2)>

<!--- Pass the tag the entire number string (decimal value OK but will be ignored) --->
<cf_number2text
		NumberString="#URL.NumberString#"
		NewTextString="Dollars_Text">

<!--- Pass the tag only the decimal value for this example --->
<cf_number2text
		NumberString="#Variables.Cents#"
		NewTextString="Cents_Text">
		
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Numbers2Text Sample Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<cfoutput>
  <table align="center" width="775" border="0" cellpadding="5"> 
    <tr> 
      <td colspan="2" align="center"><h1>Number2Text Sample Test Page</h1></td> 
    </tr> 
	<tr> 
      <td colspan="2" align="center">
	  	<form action="" method="get">
           Enter a numeric amount: $
          <input type="text" name="NumberString" value="#URL.NumberString#"> 
          <input type="submit"> 
        </form> </td> 
    </tr> 
    <tr> 
      <td colspan="2"><hr></td> 
    </tr> 
    <tr> 
      <td>Returned integer text string:</td> 
      <td><strong>#Dollars_Text#</strong></td> 
    </tr>
	<tr> 
      <td>Returned decimal text string:</td> 
      <td><strong>#Cents_Text#</strong></td> 
    </tr> 
    <tr> 
      <td>Example for printing checks:</td> 
      <td><strong>#Dollars_Text# and #Variables.Cents#/100</strong></td> 
    </tr>
	<tr> 
      <td>Example for use in sentance:</td> 
      <td><strong>John has #LCase(Dollars_Text)# dollars and #LCase(Cents_Text)# cents.</strong></td> 
    </tr>
	<tr> 
      <td colspan="2" align="center"><hr></td> 
    </tr>
  </table>
 </cfoutput>
</body>
</html>